<%@page import="com.sun.xml.internal.txw2.Document"%>
<%
	int sessionUserID = -1;
	int sessionUserLevel = -1;
	try {
  		sessionUserID = ((Integer)session.getAttribute("userId")).intValue();;
  		sessionUserLevel = ((Integer)session.getAttribute("userLevel")).intValue();
  	} catch(Exception e) {
  		//response.sendRedirect("login.jsp"); 
  	}
	boolean isLoggedIn = false;
	if(sessionUserID != 0 && sessionUserID != -1) {
		if(sessionUserLevel != 0 && sessionUserLevel != -1) {
			isLoggedIn = true;
		}
	}
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html  xmlns="http://www.w3.org/1999/xhtml" lang="en"> 
<head>
<title>IGNOU Student Assignment Management System</title>
	<link rel="STYLESHEET" type="text/css" href="../css/style.css"/>
	<link rel="stylesheet" type="text/css" href="../css/header.css" />
	<script type="text/javascript" src="../script/login.js"></script>
	<script type="text/javascript" src="../script/menu.js"></script>
	<script type="text/javascript" src="../script/ajax.js"></script>
	<script type="text/javascript" src="../script/constants.js"></script>
	<script type="text/javascript" src="../script/validation.js"></script>
</head>

<body onload="document.getElementById('username').focus(); loadPage('home'); checkForCookies();" >
	
	
<table width="100%"  style="background: #EEEEEE; height:70px; border:0px">
	<tr>
		<td width="55%">
			<img src="../images/assignment.png" alt="IGNOU Student Assignment Management System"  style="height:70px; width:250px"/>
		</td>
		<td width="25%" valign="top" align="right">
			<jsp:include page="loginMenu.jsp"/> 
		</td>
	</tr>
	
	
		<tr>
		<td colspan="2">
			
		</td>
	</tr>
	
</table>
	
	<table width="100%" border="0" style="background: #FFFFFF; padding-right: 50px; padding-left: 25px; height: 380px; " >
		<tr>
			<td width="70%" style="background: #FFFFFF; border: 1px solid #EEEEEE; margin-top: 10px;" valign="top">
				<table width="100%" style="">
					<tr>
						<td valign="top" width="100%">
							<span id="holder" style="background: #FFFFFF; text-align: center; margin-top: 10px;"></span>
						</td>
					</tr>
				</table>
			</td>	
			<td width="30%" valign="top" style="background: #FFFFFF; ">
				<table width="100%" class="loginHolder" >
					<tr>
						<td width="100%" valign="top" style="border: 1px solid #EAE9CA; text-align: center">
							<br/>
							<font style="font-family:verdana,arial,helvetica,sans; font-size:20px; ">Login</font>
							<form method="post" name="loginPanel" action="" onsubmit="return validateLoginForm(this);" class="loginform">
								<table >
									<tr>
										<td colspan="2" >
											<input type="hidden" name="action" value="login" />		
										</td>
									</tr>
									<tr>
										<td width="100px;">
											<label for="loginType">Login Type:</label>&nbsp;&nbsp;		
										</td>
										<td width="150px;">
											<select onchange="loginTypeSelection(this.value);" style="width: 185px;" size="1" name="login_type" id="login_type">
												<option selected="selected" value="Student">Student</option>
												<option value="Administrator">Administrator</option>	
												<option value="Evaluator">Evaluator</option>				
											</select>		
										</td>
									</tr>
									<tr>
										<td width="100px;">
											<label id="lable_username" for="username">Roll Number:</label>&nbsp;&nbsp;		
										</td>
										<td width="150px;">
											<input type="text" id="username" name="username" style="width:180px;"/>		
										</td>
									</tr>
									
									<tr>
										<td width="100px;">
											<label id="lable_password" for="passwd">DOB:</label>&nbsp;&nbsp;		
										</td>
										<td width="150px;">
											<span id='span_password'>
												<input type="text" id="password" name="password" style="width:180px;color:#C1C1C1;" value="YYYY-MM-DD"/>	
											</span>
										</td>
									</tr>
									
									<tr>
										<td width="100px;">
											&nbsp;&nbsp;		
										</td>
										
										<td width="150px;" align="left">
											<input type="submit" onclick="" value="Login" style="background-color:#00A9EC; cursor: pointer; border:1px solid #00A9EC; padding-top:3px; padding-bottom:3px; padding-right:15px; padding-left:15px; color:white;" />		
										</td>
									</tr>
									<tr>
										<td width="250px;" align="center" colspan="2">
											<p>			
									    	<font color="maroon">
												<span id="loginErrorPanel">&nbsp;</span>
											</font>
											</p>
										</td>
									</tr>
									<tr>
										<td width="250px;" align="left" colspan="2">
											<p><input type=checkbox name="enabled" id="enabled" value="" style="cursor:pointer;" checked="checked" /> &nbsp; Remember me on this computer.</p>
										</td>
									</tr>
									<tr>
										<td colspan="2">
											<label>Please enable cookies for this web site.</label>
										</td>
									</tr>
								</table>
							</form>
						</td>
						
					</tr>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>
